<p>Throwing an exception from within a finally block will mask any exception which was previously thrown in the <code>try</code> or <code>catch</code>
block, and the masked’s exception message and stack trace will be lost.</p>
<h2>Noncompliant Code Example</h2>
<pre>
try {
  /* some work which end up throwing an exception */
  throw new IllegalArgumentException();
} finally {
  /* clean up */
  throw new RuntimeException();       // Noncompliant; masks the IllegalArgumentException
}
</pre>
<h2>Compliant Solution</h2>
<pre>
try {
  /* some work which end up throwing an exception */
  throw new IllegalArgumentException();
} finally {
  /* clean up */
}
</pre>
<h2>See</h2>
<ul>
  <li> <a href="https://wiki.sei.cmu.edu/confluence/x/FTZGBQ">CERT, ERR05-J.</a> - Do not let checked exceptions escape from a finally block </li>
</ul>

